import request from '@/router/axios'

export function fetchProjectList(query) {
  return request({
    url: '/exam/project/project/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/exam/project/project',
    method: 'post',
    data: obj
  })
}

export function getProject(id) {
  return request({
    url: '/exam/project/project/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/exam/project/project/' + id,
    method: 'delete'
  })
}

export function delIds(ids) {
  return request({
    url: '/exam/project/project/removeByIds/' + ids,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/exam/base/template',
    method: 'put',
    data: obj
  })
}

export function projectSubmit(obj) {
  return request({
    url: '/exam/project/project/submit',
    method: 'post',
    data: obj
  })
}

export function submitAudit(obj) {
  return request({
    url: '/exam/project/project/submitAudit',
    method: 'post',
    data: obj
  })
}

/**
 * 生成文书
 * @param obj
 * @returns {AxiosPromise}
 */
export function genProjectWord(obj) {
  return request({
    url: '/exam/project/project/genWord',
    method: 'post',
    data: obj
  })
}

export function termination(obj) {
  return request({
    url: '/exam/project/project/termination',
    method: 'post',
    data: obj
  })
}
